home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
macros
/
mtex
/
documentation
/
mdocverb.tex
(
.txt
)
< prev
next >
Wrap
LaTeX Document
|
1991-04-26
|
1KB
|
37 lines
% macros for verbatim scanning
% im wesentlichen dem file MANHDR TEX von DEK entnommen
\catcode`@=11
\def\tt{\fam\ttfam\tentt}%
\newskip\ttglue \ttglue=.5em plus .25em minus .15em
\chardef\other=12
\def\ttverbatim{\begingroup
\catcode`\\=\other
\catcode`\{=\other
\catcode`\}=\other
\catcode`\$=\other
\catcode`\&=\other
\catcode`\#=\other
\catcode`\%=\other
\catcode`\~=\other
\catcode`\_=\other
\catcode`\^=\other
\catcode`\"=\other
\parskip \z@
\obeyspaces \obeylines \tt}
\def\begintt{$$\let\par=\endgraf \ttverbatim
\catcode`\|=0 \rightskip-5pc \ttfinish}
{\catcode`\|=0 |catcode`|\=\other % | is temporary escape character
|obeylines % end of line is active
|gdef|ttfinish#1^^M#2\endtt{|vbox{#2}|endgroup$$}}
\catcode`\|=\active
{\obeylines \gdef|{\ttverbatim \spaceskip\ttglue \let^^M=\ \let|=\endgroup}}
%\def\ttspace{{\tt\hskip\ttglue}}
\def\vrt{\hbox{\tt\char`\|}} % vertical line
\def\dn{\hbox{\tt\char'14}} % downward arrow
\def\up{\hbox{\tt\char'13}} % upward arrow
\def\]{\hbox{\tt\char`\ }} % visible space
\catcode`@=12 % at signs are no longer letters
\def\verbatimon{\catcode`\|=\active}
\def\verbatimoff{\catcode`\|=\other}
\verbatimoff